<!DOCTYPE html>
<!--[if IE 8]>
<html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]>
<html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="zxx">
<!--<![endif]-->
<!-- Begin Head -->

<head>
    <title>班级成员</title>
    <link id="icon" rel="shortcut icon" href="static/picture/favicon.ico">
    <meta charset="utf-8">
    <meta content="width=device-width, initial-scale=1.0" name="viewport">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <meta name="author" content="">
    <meta name="MobileOptimized" content="320">
    <!--Start Style -->
    <link rel="stylesheet" type="text/css" href="static/css/fonts.css">
    <link rel="stylesheet" type="text/css" href="static/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="static/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="static/css/icofont.min.css">
    <link rel="stylesheet" type="text/css" href="static/css/style.css">
    <link rel="stylesheet" id="theme-change" type="text/css" href="">
    <script src="static/js/jquery.min.js"></script>
    <script src="static/js/js_on_develop/header.js"></script>
    <script src=static/js/js_on_develop/basic.js></script>
    <script src="static/js/js_on_develop/GetParam.js"></script>
    <script src="static/js/js_on_develop/study-communicate.js"></script>

</head>


<body>
    <div class="loader">
        <div class="spinner">
            <img src="static/picture/loader.gif" alt="">
        </div>
    </div>
    <!-- Main Body -->
    <div class="page-wrapper">
        <!-- Header 公共部分 -->
        <div class="header-page"></div>
        <!-- Container Start -->
        <div class="page-wrapper">
            <div class="main-content">
                <!-- Page Title Start -->
                <div class="row">
                    <div class="colxl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                        <div class="page-title-wrapper">
                            <div class="page-title-box">
                                <h2 id="lno" class="page-title bold"></h2>
                            </div>
                            <div class="btn-group dropdown-action">
                                <button id="cno-select" type="button"
                                    class="btn btn-primary squer-btn dropdown-toggle" data-toggle="dropdown">全部班级</button>
                                <div id="lesson-list" class="dropdown-menu">
                                    <a id="cno-button" class="dropdown-item" href="javascript:;"> 全部班级</a>
                                </div>
                            </div>
                            <div></div>
                            <div class="btn-group dropdown-action" style="margin-left: 2vw">
                                <button id="finish-button" type="button"
                                    class="btn btn-primary squer-btn dropdown-toggle" data-toggle="dropdown">全部</button>
                                <div class="dropdown-menu">
                                    <a class="dropdown-item" href="javascript:changeFinish('全部',10);"> 全部</a>
                                    <a class="dropdown-item" href="javascript:changeFinish('已完成',10);"> 在线</a>
                                    <a class="dropdown-item" href="javascript:changeFinish('未完成',10);">离线</a>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- Table Start -->
                <div class="row">
                    <!-- Styled Table Card-->
                    <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                        <div class="card table-card">
                            <div class="card-header pb-0">
                                <h4 id="lesson-show">班级成员列表</h4>

                            </div>
                            <div class="card-body">
                                <div class="chart-holder">
                                    <div class="table-responsive">
                                        <table class="table table-styled mb-0">
                                            <thead>
                                                <tr>
                                                    <th>学号</th>
                                                    <th>头像</th>
                                                    <th>姓名</th>
                                                    <th>在线状态</th>
                                                    <th>查看聊天框</th>
                                                </tr>
                                            </thead>
                                            <tbody id="chat_tb">
                                                <tr id="chat_tr">
                                                    <td></td>
                                                    <td>
                                                        <span class="img-thumb">
                                                            <img src="static/picture/user.jpg" alt="">
                                                            <span class="ml-2"></span>
                                                        </span>
                                                    </td>
                                                    <td></td>
                                                    <td>
                                                        <label class="mb-0 badge badge-success" >Success</label>
                                                    </td>
                                                    <td class="relative " style="width: 200px">
                                                        <button type="button"
                                                            class="effect-btn btn btn-primary squer-btn mt-2 mr-2 commitButton chat-button"
                                                            id="commit">聊天</button>

                                                    </td>
                                                    <td style="visibility: hidden"></td>
                                                </tr>
                                            </tbody>
                                        </table>
                                        <div class="text-right">
                                            <nav class="d-inline-block">
                                                <ul id="page-select" class="pagination mb-0 ">
                                                    <li id="select-left" class="page-item disabled ">
                                                        <button  class="page-link" href="javascript:void(0);" tabindex="-1"><i class="fas fa-chevron-left"></i></button>
                                                    </li>
                                                    <li id="active" class="page-item active ">
                                                        <a class="page-link " href="javascript:void(0); ">1</a>
                                                    </li>
                                                    <li id="select-right" class="page-item ">
                                                        <button class="page-link " href="javascript:void(0); "><i class="fas fa-chevron-right "></i></button>
                                                    </li>
                                                </ul>
                                            </nav>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>

<!-- Script Start -->
    <script>getPage()</script>
    <script src="static/js/popper.min.js"></script>
    <script src="static/js/bootstrap.min.js"></script>
    <script src="static/js/custom.js"></script>
</body>

<script>
$($(".chat-button")).click(function (e) {
    var tr=$(e.target).parent().parent()
    console.log(tr.children().eq(5).text())

    function chat()
    {
        const uid=tr.children().eq(5).text()
        const name=tr.children().eq(2).text()
        const sid=tr.children().eq(1).text()
        jump_to_chat();
        function jump_to_chat()
        {
            const url = "upload2.html?aid=" + aid + "&courseName=" + courseName + "&assignmentName=" + assignmentName + "&detail=" + detail;
            window.location.href=url;
        }
    }
})
</script>

</html>